
<div id="tally">
	<h3>Statistics</h3>
	<table class="centeredtable" border="1">
		<thead class="centeredtext">
			<tr>
				<th width="130px">Year Level</th>
				<th width="130px">Male</th>
				<th width="130px">Female</th>
			</tr>
		</thead>
		<tbody class="centeredtext">
			<?php $maleTotal=0;$femaleTotal=0;?>
			<?php for($i=0;$i<count($classification);$i++){?>
			<tr>
				<td><?php echo $classification[$i];?></td>
				<td><?php $row=$info_male[$i]->row();$count = $row->classification_count;$maleTotal+=$count;echo $count;?></td>
				<td><?php $row=$info_female[$i]->row();$count = $row->classification_count;$femaleTotal+=$count;echo $count;?></td>
			</tr>
			<?php }?>
		</tbody>
		<tfoot class="centeredtext">
			<tr><td colspan="3">]]~~>>---<<~~[[</td></tr>
			<tr>
				<td>Total</td>
				<td><?php echo $maleTotal;?></td>
				<td><?php echo $femaleTotal;?></td>
			</tr>
		</tfoot>
	</table>
	<br/>
	<form name="tallyform" method="post" onSubmit="return OnSubmitForm();">
	<input type="submit" value="Back to Main" class="shortobject" onClick="document.pressed=this.value"/>
	</form>
</div><!-- End tally -->
